package com.company;

/**
 * 学生信息的类：
 *      名字
 *      二级院校
 *      班级
 *      学号
 *      身份证号
 *      家庭住址
 */
public class Student {
    private String name;    // 学生的名字
    private Integer num;    //学生的学号
    private String yuan;    //学生所属的二级院校
    private String ban;     //学生所属班级
    private long ID;        //学生的身份证号
    private String home;      //学生的家庭住址
    private static int i = 1;

    //构造方法
    public Student(){
        this.num = i ++;
    }
    public Student(String name,String yuan,String ban,long ID,String home){
        this.name = name;
        this.num = i ++;
        this.yuan = yuan;
        this.ban = ban;
        this.ID = ID;
        this.home = home;
    }

    public String getName() {
        return name;
    }

    public Integer getNum() {
        return num;
    }

    public String getYuan() {
        return yuan;
    }

    public String getBan() {
        return ban;
    }

    public String getHome() {
        return home;
    }

    public long getID() {
        return ID;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setYuan(String yuan) {
        this.yuan = yuan;
    }

    public void setBan(String ban) {
        this.ban = ban;
    }

    public void setID(long ID) {
        this.ID = ID;
    }

    public void setHome(String home) {
        this.home = home;
    }

    @Override
    public String toString() {
        return "学生{" +
                "名字：'" + name + '\'' +
                ", 学号：" + num +
                ", 二级院校'" + yuan + '\'' +
                ", 班级'" + ban + '\'' +
                ", 身份证号：" + ID +
                ", 家庭住址：'" + home + '\'' +
                '}';
    }
}
